package basics.day12.ConstructorLoad;

/*
 * 构造器的重载
 * */
public class Person {
    private int age;
    private String name;

    // 定义一个没有参数的构造器
    public Person() {
    }

    // 定义一个有参数的构造器
    public Person(int age, String name) {
        this.age = age;
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }


}
